<?php

declare(strict_types=1);
/**
 * Created by PhpStorm.
 * User: liboran
 * Date: 2019/12/16
 * Time: 5:22 PM
 */

namespace App\Entity;

use App\Models\ProductsCategory;

class ProductCategoryEntity extends ABaseEntity
{
    public function __construct(ProductsCategory $model)
    {
        $this->model = $model;
    }

    /**
     * @return int
     */
    public function getId()
    {
        return (int)$this->model->id;
    }

    public function getCategoryName()
    {
        return (string) $this->model->category_name;
    }

    /**
     * @param int $id
     */
    public function setId(int $id): void
    {
        $this->model->id = $id;
    }

    /**
     * @param int $pid
     */
    public function setPid(int $pid): void
    {
        $this->model->pid = $pid;
    }

    /**
     * @param string $category_name
     */
    public function setCategoryName(string $category_name): void
    {
        $this->model->category_name = $category_name;
    }

    /**
     * @param int $order_by
     */
    public function setOrderBy(int $order_by): void
    {
        $this->model->order_by = $order_by;
    }

    /**
     * @param string $created_at
     */
    public function setCreatedAt(string $created_at): void
    {
        $this->model->created_at = $created_at;
    }

    /**
     * @param string $updated_at
     */
    public function setUpdatedAt(string $updated_at): void
    {
        $this->model->updated_at = $updated_at;
    }

    /**
     * @return int
     */
    public function getPid(): int
    {
        return (int)$this->model->pid;
    }

    /**
     * @return int
     */
    public function getOrderBy(): int
    {
        return (int)$this->model->order_by;
    }

    /**
     * @return string
     */
    public function getCreatedAt(): string
    {
        return (string)$this->model->created_at;
    }

    /**
     * @return string
     */
    public function getUpdatedAt(): string
    {
        return (string)$this->model->updated_at;
    }
}
